How can I remove the process currently using a port on localhost in Windows?
How can I remove the process currently using a port on localhost in Windows?
35114-Jul-2023
Updated on 15-Jul-2023
Home / DeveloperSection / Forums / How can I remove the process currently using a port on localhost in Windows?
How can I remove the process currently using a port on localhost in Windows?
Aryan Kumar
15-Jul-2023There are a few ways to remove the process currently using a port on localhost in Windows. Here are two methods:
Method 1: Using the
netstat
commandThe
netstat
command is a command-line utility that displays network statistics. You can use thenetstat
command to find the process that is using a specific port.To do this, follow these steps:
Replace
PORT
with the port number that you want to find the process for. For example, to find the process that is using port 8080, you would run the following command:This will display a list of all the processes that are using port 8080. The process ID (PID) of the process will be listed in the second column.
taskkill
command to kill the process.To do this, run the following command:
Replace
PID
with the PID of the process that you want to kill. For example, to kill the process with PID 1234, you would run the following command:Method 2: Using the
CurrPorts
toolThe
CurrPorts
tool is a third-party tool that can be used to view and manage open ports on Windows. You can use theCurrPorts
tool to find the process that is using a specific port and then kill the process.To do this, download and install the
CurrPorts
tool. Once the tool is installed, open it and click on the Processes tab.In the Processes tab, you will see a list of all the processes that are currently running on your computer. The port number that each process is using will be listed in the Local Port column.
Once you have found the process that is using the port that you want to remove, right-click the process and select Kill.
This will kill the process and the port will be freed up.